# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=miranda-upnp
pkgver=1.3
pkgrel=10
groups=('blackarch' 'blackarch-exploitation' 'blackarch-scanner')
pkgdesc='A Python-based Universal Plug-N-Play client application designed to discover, query and interact with UPNP devices.'
url='http://code.google.com/p/miranda-upnp/'
arch=('any')
license=('MIT')
source=("http://miranda-upnp.googlecode.com/files/miranda-$pkgver.tar.gz")
sha512sums=('8fd8aa4bde72ba57d1d6c0c0c14055687fccc612')

prepare() {
  cd "$pkgname-$pkgver"

  sed -i 's/env python$/env python2/' src/miranda.py
}

package() {
  cd "$pkgname-$pkgver"

  install -dm 755 "$pkgdir/usr/share/doc"

  install -Dm 755 src/portmapper.sh "$pkgdir/usr/bin/miranda-upnp-portmapper"
  install -m 755 src/miranda.py "$pkgdir/usr/bin/miranda"

  cp -a docs/ "$pkgdir/usr/share/doc/$pkgname/"
}

